import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';

startLoading({String loaingTxt = ''}) {
  if (loaingTxt.isEmpty) {
    loaingTxt = 'loading'.tr;
  }
  return EasyLoading.show(
    status: loaingTxt,
    maskType: EasyLoadingMaskType.black,
  );
}

stopLoading() {
  return EasyLoading.dismiss();
}

showSuccess({message = ''}) {
  return EasyLoading.showSuccess(message);
}

showError({message = ''}) {
  return EasyLoading.showError(message);
}

showInfo({message = ''}) {
  return EasyLoading.showSuccess(message);
}
